/* character-shop.css */
body {
    background-image: url('https://images.unsplash.com/photo-1511512578047-dfb367046420?ixlib=rb-1.2.1&auto=format&fit=crop&w=1351&q=80');
}

.character-grid {
    display: grid;
    /* 每行显示10个元素 */
    grid-template-columns: repeat(5, 1fr);
    gap: 30px;
    padding: 20px 0;
}

.character-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
    height: 30vh;
}

.character-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.character-card.disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.character-image {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 1;
}

.character-info {
    position: absolute;
    width: 100%;
    left: 0;
    bottom: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.1) 100%)
}

.character-name {
    flex: 2;
    font-size: 1em;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    z-index: 3;
}

.character-description {
    flex: 1;
    font-size: 0.8em;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
}

.price-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.price {
    font-weight: bold;
    font-size: 1em;
    color: #ffd700;
}

.price.insufficient {
    color: #ff6b6b;
}

.buy-button {
    width: auto;
    margin-left: 5%;
    margin-right: 5%;
    padding: 3px;
    border: none;
    border-radius: 2px;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    cursor: pointer;
    font-weight: bold;
    font-size: 1em;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    margin-bottom: 3px;
}

.buy-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #2575fc 0%, #6a11cb 100%);
}

.buy-button:active:not(:disabled) {
    transform: translateY(0);
}

.buy-button:disabled {
    background: linear-gradient(135deg, #555 0%, #333 100%);
    cursor: not-allowed;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .character-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    .money-display {
        max-width: 100%;
    }

    .character-name {
        font-size: 1.3em;
    }
}